
package com.uuah.server.api;

import javax.resource.spi.work.WorkListener;

import com.uuah.api.config.IThreadingProfile;
import com.uuah.api.lifecycle.ILifecycle;
import com.uuah.api.work.IWorkManager;
import com.uuah.queue.IQueueManager;
import com.uuah.server.api.config.IUuahConfiguration;
import com.uuah.server.api.config.registry.IRegistry;
import com.uuah.server.api.config.registry.IUuahRegistry;
import com.uuah.server.api.context.notification.linstener.IServerNotificationListener;
import com.uuah.server.api.lifecycle.ILifecycleManager;
import com.uuah.server.context.notification.ServerNotification;
import com.uuah.server.context.notification.ServerNotificationManager;
import com.uuah.server.exception.context.notification.NotificationException;
import com.uuah.server.exception.registry.RegistrationException;

/**
 * <code>ExceptionPayload</code> is a message payload that contains exception
 * information that occurred during message processing.
 *
 * <p>update record:updator，update time，update content and version</p>
 * @author <a href="jonny_quan@hotmail.com">jonny</a>
 * @date 2009 2009-3-27 上午12:14:32
 * @version 1.0.0
 */
public interface IUuahContext extends ILifecycle {
	ServerNotificationManager getNotificationManager();

	boolean isStarted();

	boolean isInitialised();

	boolean isInitialising();

	boolean isDisposed();

	boolean isDisposing();

	void registerListener(IServerNotificationListener l)
			throws NotificationException;

	void registerListener(IServerNotificationListener l,
			String resourceIdentifier) throws NotificationException;

	void unregisterListener(IServerNotificationListener l);

	void fireNotification(ServerNotification notification);

	IWorkManager getWorkManager();

	WorkListener getWorkListener();

	void setQueueManager(IQueueManager queueManager)
			throws RegistrationException;

	IQueueManager getQueueManager();

	ILifecycleManager getLifecycleManager();

	IUuahRegistry getRegistry();

	IUuahConfiguration getConfiguration();

	IThreadingProfile getDefaultMessageDispatcherThreadingProfile();

	IThreadingProfile getDefaultMessageReceiverThreadingProfile();

	IThreadingProfile getDefaultServiceThreadingProfile();

	IThreadingProfile getDefaultThreadingProfile();

	void addRegistry(long id, IRegistry registry);

	void removeRegistry(long id);

	long getStartDate();
}
